feat(UI): add Radix UI table component#1083
Merged
benjamin-747 merged 1 commit intoJun 2, 2025
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds Radix UI table support and integrates it into existing code views and page layouts.
- Introduces
@radix-ui/themesdependency and global styles - Implements a new
RTablecomponent underCodeView/Tableand refactorsCodeTable.tsxto use it - Wraps layouts with Radix
Themeprovider in relevant pages
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pages/_app.tsx | Imports Radix UI theme styles and config constants |
| pages/[org]/code/tree/[...path]/index.tsx | Wraps TreeDetailPage in Theme, refactors formatting |
| pages/[org]/code/index.tsx | Wraps code page in Theme provider |
| package.json | Adds @radix-ui/themes dependency |
| components/CodeView/Table/index.tsx | New Radix-based RTable component |
| components/CodeView/CodeTable.tsx | Switches from Ant Design Table to RTable |
| components/CodeView/index.tsx | Updates imports and formatting |
Comments suppressed due to low confidence (2)
moon/apps/web/components/CodeView/Table/index.tsx:5
- [nitpick] The component is named
tablebut React components should start with an uppercase letter; rename it toTableorRTablefor clarity.
const table = <T extends DirectoryType>({
moon/apps/web/pages/[org]/code/tree/[...path]/index.tsx:21
- [nitpick] Variable
new_pathuses snake_case; consider using camelCase (newPath) to align with JavaScript naming conventions.
const new_path = '/' + path?.join('/')
Comment on lines
+26
to
+28
| <> | ||
| <Table.ColumnHeaderCell>{c.title}</Table.ColumnHeaderCell> | ||
| </> |
There was a problem hiding this comment.
Each header cell rendered in columns.map is missing a unique key prop; add key={c.key} (or similar) on <Table.ColumnHeaderCell> and remove the unnecessary fragment.
Suggested change
| <> | |
| <Table.ColumnHeaderCell>{c.title}</Table.ColumnHeaderCell> | |
| </> | |
| <Table.ColumnHeaderCell key={c.key}>{c.title}</Table.ColumnHeaderCell> |
benjamin-747
approved these changes
Jun 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
增加:
Radix UI table组件
Radix UI 相关依赖
修改:
CodeView table相关逻辑